﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DeviceCommon
{
    public interface IServer
    {
        /// <summary>
        /// 监测的设备之一运行状态发生更新事件
        /// </summary>
        event DeviceStateChangedEventHandler StateChanged;

        /// <summary>
        /// 监测的设备之一动作状态发生更新, 需要向检测者报告结果，并向客户端回复
        /// </summary>
        event DeviceMsgResponsedEventHandler MsgResponsed; 

        /// <summary>
        /// 设备动作超时事件
        /// </summary>
        event DeviceActionTimeoutEventHandler ActionTimeout;

        bool Running { get; }
        string ErrorMessage { get; }     
        IDevice ActivedDevice { get; set; }
        bool StartServer();
        void Close();
    }
}
